{% extends "todo/base.html" %}

{% block content %}
    <div class="row justify-content-center mt-5">
        <div class="col-md-5">
            <h2>New Todo</h2>
        </div>
    </div>
    <div class="row justify-content-center mt-5">
        <div class="col-md-5">
            {% if error %}
                <div class="alert alert-danger" role="alert">
                    {{ error }}
                </div>
            {% endif %}
            <form method="POST">
                {% csrf_token %}
                <div class="form-group">
                    <label for="title">Title</label>
                    <input type="text" name="title" class="form-control" id="title" required>
                </div>
                <div class="form-group">
                    <label for="memo">Memo</label>
                    <textarea name="memo" class="form-control" id="memo" ></textarea>
                </div>
                <div class="form-group form-check">
                    <input type="checkbox" name="important" class="form-check-input" id="important">
                    <label class="form-check-label" for="important">Important</label>
                </div>
                <button type="submit" class="btn btn-primary">Save</button>
            </form>
        </div>
    </div>
{% endblock %}